package cz.najman.emdroid.mappings;

import java.util.HashMap;

import android.net.Uri;
import android.provider.BaseColumns;
import cz.najman.emdroid.provider.EMDroidDataProvider;
import cz.najman.emdroid.provider.Flags;

public class EventInstitutionManager extends Mappings implements BaseColumns, Flags {

	public static final String URI_STRING_EVNT_INST_MNG = "content://" + EMDroidDataProvider.AUTHORITY + "/eventInstitutionManagers";
	public static final String URI_STRING_EVNT_INST_MNG_FOR_EVENT = "content://" + EMDroidDataProvider.AUTHORITY + "/eventInstitutionManagers/forEvent";
	public static final String URI_STRING_EVNT_INST_MNG_FOR_USER = "content://" + EMDroidDataProvider.AUTHORITY + "/eventInstitutionManagers/forUser";
	public static final String URI_STRING_EVNT_INST_MNG_FOR_INSTITUTION = "content://" + EMDroidDataProvider.AUTHORITY + "/eventInstitutionManagers/forInstitution";
	/**
	 * Uri representing the event resource
	 */
	public static final Uri CONTENT_URI_EVNT_INST_MNG = Uri.parse(URI_STRING_EVNT_INST_MNG);
	public static final Uri CONTENT_URI_EVNT_INST_MNG_FOR_USER = Uri.parse(URI_STRING_EVNT_INST_MNG_FOR_USER);	
	public static final Uri CONTENT_URI_EVNT_INST_MNG_FOR_EVENT = Uri.parse(URI_STRING_EVNT_INST_MNG_FOR_EVENT);
	public static final Uri CONTENT_URI_EVNT_INST_MNG_FOR_INSTITUTION = Uri.parse(URI_STRING_EVNT_INST_MNG_FOR_INSTITUTION);

	/**
	 * Content type dir
	 */
	public static final String CONTENT_TYPE_DIR = "vnd.android.cursor.dir/vnd.mitch.eventInstitutionManager";
	/**
	 * Content type item
	 */
	public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.mitch.eventInstitutionManager";
	
	public static final int OBJECT_ID = 6;
	
	/* DATABASE COLUMNS NAMES */
	
	/**
	 * Unique id for the EventInstitutionManager
	 */
	//public static final String _ID = "evnt_inst_mng_id";
	
	public static final String TABLE_NAME = "event_managers";
	
	public static final String MANAGER_ID = "manager_id";
	
	public static final String INSTITUTION_ID = "institution_id";
	
	public static final String EVENT_ID = "event_id";
	
	/* DATABASE COLUMS INDEXES */
	
	public static final int INDEX_ID = 0;
	
	public static final int INDEX_MANAGER_ID = 1;
	
	public static final int INDEX_INSTITUTION_ID = 2;
	
	public static final int INDEX_EVENT_ID = 3;
	
	/* MAPPING KEYS */	
	private static final String M_KEY_START_TAG = "eventInstitutionManager";
	private static final String M_KEY_ID = "id";
	private static final String M_KEY_EVENT_ID = "eventId";
	private static final String M_KEY_INSTITUTION_ID = "institutionId";
	private static final String M_KEY_MANAGER_ID = "userId";
	
	public EventInstitutionManager() {
		mToDbMappings = new HashMap<String, String>();
		mFromDbMappings = new HashMap<String, String>();
		
		mToDbMappings.put(M_KEY_START_TAG, START_TAG);
		mToDbMappings.put(M_KEY_ID, _ID);
		mToDbMappings.put(M_KEY_EVENT_ID,EVENT_ID);
		mToDbMappings.put(M_KEY_INSTITUTION_ID,INSTITUTION_ID);
		mToDbMappings.put(M_KEY_MANAGER_ID,MANAGER_ID);				
	}
	
}
